

        <g:set var="entityName" value="${message(code: 'exam.label', default: 'Exam')}" />
             <g:form action="save" method="post" >
            <input type="hidden" name="classes.id" value="${examInstance?.classes?.id}"  >
            <input type="hidden" name="course" value="${examInstance?.course}"  >
                <div class="dialog">
                    <table>
                        <tbody> 
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="title"><g:message code="exam.title.label" default="Title" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'title', 'errors')}">
                                    <g:textField name="title" maxlength="50" value="${examInstance?.title}" />
                                </td>
                            </tr>
                         
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="startTime"><g:message code="exam.startTime.label" default="Start Time" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'startTime', 'errors')}">
                                    <input type="text" name="startTime" id="startTime" value="${formatDate(date:examInstance?.startTime , format :'yyyy-MM-dd')}">
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="title"><g:message code="exam.group.label" default="group" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'group', 'errors')}">
                                    <g:lookupSelect id="group" name="group" realm="examGroup"
                                                             value="${examInstance?.group}"/>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="title"><g:message code="exam.maximum.label" default="maximum" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'maximum', 'errors')}">
                                    <g:textField name="maximum" maxlength="50" value="${examInstance?.maximum}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="title"><g:message code="exam.best.label" default="best" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'best', 'errors')}">
                                    <g:textField name="best" maxlength="50" value="${examInstance?.best}" />
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="title"><g:message code="exam.pass.label" default="pass" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: examInstance, field: 'pass', 'errors')}">
                                    <g:textField name="pass" maxlength="50" value="${examInstance?.pass}" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>